package com.ruoyi.wms.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import com.ruoyi.wms.mapper.WmsBorrowDetailsMapper;
import com.ruoyi.wms.domain.WmsBorrowDetails;
import com.ruoyi.wms.service.IWmsBorrowDetailsService;

import javax.annotation.Resource;

/**
 * 物料借用单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-05
 */
@Service
public class WmsBorrowDetailsServiceImpl implements IWmsBorrowDetailsService 
{
    @Resource
    private WmsBorrowDetailsMapper wmsBorrowDetailsMapper;

    /**
     * 查询物料借用单明细
     * 
     * @param borrowDetailUuid 物料借用单明细主键
     * @return 物料借用单明细
     */
    @Override
    public WmsBorrowDetails selectWmsBorrowDetailsByBorrowDetailUuid(String borrowDetailUuid)
    {
        return wmsBorrowDetailsMapper.selectWmsBorrowDetailsByBorrowDetailUuid(borrowDetailUuid);
    }

    /**
     * 查询物料借用单明细列表
     * 
     * @param wmsBorrowDetails 物料借用单明细
     * @return 物料借用单明细
     */
    @Override
    public List<WmsBorrowDetails> selectWmsBorrowDetailsList(WmsBorrowDetails wmsBorrowDetails)
    {
        return wmsBorrowDetailsMapper.selectWmsBorrowDetailsList(wmsBorrowDetails);
    }

    /**
     * 新增物料借用单明细
     * 
     * @param wmsBorrowDetails 物料借用单明细
     * @return 结果
     */
    @Override
    public int insertWmsBorrowDetails(WmsBorrowDetails wmsBorrowDetails)
    {
        return wmsBorrowDetailsMapper.insertWmsBorrowDetails(wmsBorrowDetails);
    }

    /**
     * 修改物料借用单明细
     * 
     * @param wmsBorrowDetails 物料借用单明细
     * @return 结果
     */
    @Override
    public int updateWmsBorrowDetails(WmsBorrowDetails wmsBorrowDetails)
    {
        return wmsBorrowDetailsMapper.updateWmsBorrowDetails(wmsBorrowDetails);
    }

    /**
     * 批量删除物料借用单明细
     * 
     * @param borrowDetailUuids 需要删除的物料借用单明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsBorrowDetailsByBorrowDetailUuids(String[] borrowDetailUuids)
    {
        return wmsBorrowDetailsMapper.deleteWmsBorrowDetailsByBorrowDetailUuids(borrowDetailUuids);
    }

    /**
     * 删除物料借用单明细信息
     * 
     * @param borrowDetailUuid 物料借用单明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsBorrowDetailsByBorrowDetailUuid(String borrowDetailUuid)
    {
        return wmsBorrowDetailsMapper.deleteWmsBorrowDetailsByBorrowDetailUuid(borrowDetailUuid);
    }
}
